#include<stdio.h>

void strcpy1(char* s,char* t)
{
	int i=0;
	while((s[i]=t[i]) != '\0')
		i++;
}
void strcpy2(char* s,char* t)
{
	while((*s++ = *t++) !='\0')
		;
}
void strcpy3(char* s,char* t)
{
	while(*s++ = *t++)
		;
}

int strcmp1(char* s,char* t)
{
	int i;
	for(i=0;s[i] == t[i];i++)
		if(s[i] == '\0')
			return 0;
	return s[i] - t[i];
}

int strcmp2(char* s,char* t)
{
	for(;*s == *t;s++,t++)
		if(*s == '\0')
			return 0;
	return *s - *t;
}

int strcmp3(char* s,char* t)
{
	while(*s != '\0' && *s++ == *t++)
		;
	if(*s == '\0')
		return 0;
	return *(--s) - *(--t);
}

main()
{
	char s[] = "hello";
	char t[] = "hello";
	/*
	strcpy2(t,s);
	printf("%s",t);
	strcpy1(s,t);
	printf("%s",s);
	p = (char*)"sy";
	printf("%s",p);
	*/
	printf("%d",strcmp3(s,t));
	return 0;
}
